package com.edu.demo.entity;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.security.core.GrantedAuthority;

/**
 * <p>
 *
 * </p>
 *
 * @author jixuewei
 * @since 2023-01-12
 */
@ApiModel(value = "Role对象", description = "")
public class Role implements  GrantedAuthority , Serializable {

    private static final long serialVersionUID = 1L;

    private Integer id;

    private String roleName;

    private String roleKey;

    private Byte delFlag;

    private LocalDateTime createTime;

    private String createBy;

    private List<String> perms;

    @ApiModelProperty("0启用，1弃用")
    private Byte status;

    public List<String> getPerms() {
        return perms;
    }

    public void setPerms(List<String> perms) {
        this.perms = perms;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleKey() {
        return roleKey;
    }

    public void setRoleKey(String roleKey) {
        this.roleKey = roleKey;
    }

    public Byte getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(Byte delFlag) {
        this.delFlag = delFlag;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "Role{" +
            "id = " + id +
            ", roleName = " + roleName +
            ", roleKey = " + roleKey +
            ", delFlag = " + delFlag +
            ", createTime = " + createTime +
            ", createBy = " + createBy +
            ", status = " + status +
        "}";
    }


    @Override
    public String getAuthority() {
        return null;
    }
}
